#ifndef ULTRASOUND_H_
#define ULTRASOUND_H_

/**
 * Configures a ultrasound sensor and read data from the sensor
 * @author David Asabina
 * @author Sander van't Hof
 */

// invoke AVR IO declarations
#include <avr/io.h>

/**
 * Configures the ultrasound module
 * @param pinOut the output pin connected to the transmitting end of the sensor
 * @param pinIn the input pin connected to the receiving end of the sensor
 */
void setupUltrasound(int pinOut, int pinIn);

/**
 * Sends a sonic wave for a specified length of len cycles
 * @param len the size of the iteration count
 */
void sendUltrasound(int len);

/**
 * Reads the ultrasound sensor data
 * @param pinIn the pin from which to read the data
 */
void readUltrasound(int pinIn);


#endif
